package com.qkjia.mvc.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author zhaoqiankun
 * @date 2021/9/6
 * @RequestMapping注解的位置
 * @RequestMapping标识一个类：设置映射请求的请求路径的初始信息
 * @RequestMapping标识一个方法：设置映射请求请求路径的具体信息
 */
@Controller
@RequestMapping("/")
public class TestController {


    @RequestMapping("/")
    public String index(){
        return "index";
    }

    @RequestMapping("/param")
    public String param(){
        return "test_param";
    }

    /**
     * 此时请求映射所映射的请求的请求路径为：/test/testRequestMapping
     * @return success视图页面
     */
    @RequestMapping("/test/testRequestMapping")
    public String testRequestMapping() {
        return "success";
    }



}
